import Taro from "@tarojs/taro";
const baseURL = 'http://172.17.5.238';
const http = (options) => {
    return new Promise((resolve, reject) => {
        Taro.request({
            url:baseURL + options.url,
            method: options.method || 'get',
            data: options.data || '{}',
            header:{
                'content-type':'application/json'
            },
            success:function(res){
                resolve(res);
            },
            fail:function(err){
                reject(err);
            }
        })
    })
}

export default http;